#include <iostream>

class Test
{
public:
    Test(){std::cout << "构造函数！\n";}
    Test(const Test& t){std::cout<<"拷贝构造函数！\n";}
    void operator = (const Test& t){std::cout<<"赋值运算符重载深拷贝！\n";}
    ~Test(){std::cout << "析构函数！\n";}
};

int main()
{
    //new delete 会调用构造和析构函数  malloc不会

    int *t = new int[3];
    delete t;

    // Test *t = new Test[3];
    // delete []t;  //构造3次，析构3次
 
    return 0;
}
